package com.common.service;

import com.common.client.AopClient;
import com.common.dto.OperationLogDTO;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class AopService {
    @Resource
    private AopClient aopClient;

    @Async("logTaskExecutor")
    public void saveLog(OperationLogDTO operationLog) {
        log.info("保存操作日志: {}", operationLog);
        aopClient.saveLog(operationLog);
    }
}
